<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="Includes/nicEdit.js"></script> 
<script type="text/javascript" language="javascript" src="Includes/jquery-1.9.1.js"></script>
<script type="text/javascript" language="javascript" src="Includes/testscript.js"></script>
<script src="Includes/jQueryFileUpload/js/vendor/jquery.ui.widget.js" language="javascript"></script>
<script src="Includes/jQueryFileUpload/js/jquery.iframe-transport.js" language="javascript"></script>
<script src="Includes/jQueryFileUpload/js/jquery.fileupload.js" language="javascript"></script>
</head>

<body>
<div id="sample">
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
	 new nicEditor().panelInstance('area3');
	 nicEditors.findEditor('area3').setContent("");
	 
	 });

$(function () {
    $('#fileupload').fileupload({
        dataType: 'json',
        done: function (e, data) {
            $.each(data.result.files, function (index, file) {
                $('<p/>').text(file.name).appendTo(document.body);
            });
        }
    });
});

</script>
<textarea style="width: 300px; height: 100px;" id="area3"></textarea>
<input type="file" value="Duyệt" id="fileupload"/>
</br>
<a href="#" onclick="upload(); return false"> Upload </a> </br>
<a href="#" onclick="send(); return false"> Ok </a><br />

<a href="#" onclick="delTmpImgs(); return false"> Cancel </a><br />


<a href="#" onclick="show(); return false"> Show</a>

<?php
$src = $_SERVER['DOCUMENT_ROOT']."/Testsite/tempimgs";

$text = '<img src="tempimgs/912559200311080.jpg">'.'<img src="tempimgs/330986457178369.jpg">'.'<img src="tempimgs/850894401082769.jpg">';
echo "<br />";
echo strlen($text);
echo "<br />";

$condition = "/[0-9]{14,15}.jpg/";

$r = preg_match_all($condition, $text,$result,PREG_PATTERN_ORDER);
echo $r;
echo "<br />";
echo $result[0][0];
echo "<br />";
echo $result[0][1];
echo "<br />";
echo $result[0][2];
echo "<br />";
echo count($result[0]);

$path = $_SERVER['DOCUMENT_ROOT']."/Testsite/gioithieu.php";
$handle = fopen($path,"w");
$write = fwrite($handle,"this is a test");
?>


</div>

</body>
</html>